package com.xci.sys.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.xci.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 系统字典类型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "系统字典类型")
public class SysDicCategory extends BaseEntity {
    /**
     * 字典类型主键
     */
    @ExcelIgnore @Excel(name = "字典类型主键")
    @ApiModelProperty(value = "字典类型主键", required = true, position = 1)
    private String id;

    /**
     * 字典类型上级主键
     */
    @NotBlank(message = "字典类型上级主键不能为空")
    @Length(max = 30, message = "字典类型上级主键不能超过{max}个字符")
    @ExcelIgnore @Excel(name = "字典类型上级主键")
    @ApiModelProperty(value = "字典类型上级主键", required = true, position = 2)
    private String parentId;

    /**
     * 字典类型名称
     */
    @NotBlank(message = "字典类型名称不能为空")
    @Length(max = 100, message = "字典类型名称不能超过{max}个字符")
    @Excel(name = "字典类型名称", width = 30d)
    @ApiModelProperty(value = "字典类型名称", required = true, position = 3)
    private String name;

    /**
     * 字典类型编码
     */
    @NotBlank(message = "字典类型编码不能为空")
    @Length(max = 100, message = "字典类型编码不能超过{max}个字符")
    @Excel(name = "字典类型编码", width = 30d)
    @ApiModelProperty(value = "字典类型编码", required = true, position = 4)
    private String code;

    /**
     * 序号
     */
    @NotNull(message = "序号不能为空")
    @Excel(name = "序号")
    @ApiModelProperty(value = "序号", position = 5)
    private Integer path;

    /**
     * 备注
     */
    @Length(max = 500, message = "备注不能超过{max}个字符")
    @Excel(name = "备注", width = 40d)
    @ApiModelProperty(value = "备注", position = 100)
    private String remark;
}